package com.hundsun.cprs.yyt.gateway.service.uc.impl;

import com.hundsun.cprs.yyt.gateway.enums.EnumFundBankNo;
import com.hundsun.cprs.yyt.service.common.dto.FundCloseInfo;
import com.hundsun.cprs.yyt.gateway.service.uc.BankBindingService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.hundsun.cprs.yyt.gateway.response.BaseResponse;
import com.hundsun.cprs.yyt.service.common.dto.FundCommResponse;
import com.hundsun.cprs.yyt.service.common.dto.FundOpenInfo;
import com.hundsun.cprs.yyt.service.common.service.RemoteTradeFundService;

@Service
public class AliPayBankBindingServieImpl implements BankBindingService {
    
    @Autowired
    private RemoteTradeFundService remoteTradeFundService;

    @Override
    public String getBankNo() {
        // TODO Auto-generated method stub
        return EnumFundBankNo.ALIPAY.getCode();
    }

    @Override
    public void bindingValidate(FundOpenInfo request, BaseResponse response) {
        // TODO Auto-generated method stub
        // 支付宝直接开户
        binding(request, response);
    }

    @Override
    public void binding(FundOpenInfo request, BaseResponse response) {
        // TODO Auto-generated method stub
        FundCommResponse resp = remoteTradeFundService.open(request);
    }

    @Override
    public void unBinding(FundCloseInfo request, BaseResponse response) {
        remoteTradeFundService.close(request);
    }

}
